package cn.pku.ss.fa.ui;

public class Common {
	
	/*
	 * Session attribute names:
	 */
	public static final String USER_ID = "uid";				//value type: Integer
	public static final String FRIEND_ID = "fid";			//value type: Integer
	public static final String ALBUM_ID = "aid"; 			//value type: Integer
	public static final String PHOTO_ID = "pid"; 			//value type: Integer
	
	/*
	 * For personal
	 */
	public static final String USER_REAL_NAME = "urn";		//value type: String
	public static final String USER_PROFILE = "upro";		//value type: String
	
	/*
	 * For article
	 */
	public static final String ARTICLE_USER_ID = "articleUid";
	public static final String ARTICLE_USER_REALNAME = "articleUserRealName";
	public static final String ARTICLE_REPLIES = "articleReplies";
	public static final String CURRENT_REPLY_TO_USER_ID = "currentReplyToUserId";
	public static final String CURRENT_REPLY_TO_USER_REALNAME = "currentReplyToUserName";
	public static final String ARTICLE_ID = "articleId";
	
	/*
	 * For album
	 */
	public static final String ALBUM = "album"; 			//value type: AlbumBean
	public static final String CREATE_ALBUM_POPUP = "capp"; //value type: Popup
	public static final String ALBUM_POPUP = "app"; 		//value type: Popup
	public static final String PHOTO_POPUP = "ppp"; 		//value type: Popup
	
	public static final String DESKTOP_WIDTH = "dwidth"; 	//value type: Integer
	public static final String DESKTOP_HEIGHT = "dheight"; 	//value type: Integer
	
	public static String getWebRootRealPath() {
		return webRootRealPath;
	}
	
	public static void setWebRootRealPath(String path) {
		if( webRootRealPath==null ) {
			webRootRealPath = path;
		}
		else {
			throw new UnsupportedOperationException("webRootRealPath has been set");
		}
	}
	
	//////////////////////////////////////////////////////////////////////////////

	private static String webRootRealPath;
	
}
